const express = require("express")
const router = express.Router()
const userHandler = require("./handler.js")
const userSchema = require("../../schema/user")
const validate = require("../../schema/index")
/* GET home page. */
router.post("/addUser", validate.body(userSchema.addUser), userHandler.addUser)

router.get("/userInfo", userHandler.getUserInfo)

router.delete("/delete", validate.query(userSchema.delUser), userHandler.delUser)

router.post("/resetpassword", validate.body(userSchema.resetPassword), userHandler.resetPassword)

router.put("/updateUser", validate.body(userSchema.updateUser), userHandler.updateUser)

router.get("/userlist", validate.query(userSchema.uesrList), userHandler.getUserList)

module.exports = router
